import request from '@/utils/request'

const API_NAME = '/admin/user/admins'

export function login(data) {
  return request({
    url: `${API_NAME}/`,
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: `${API_NAME}/info`,
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: `${API_NAME}/logout`,
    method: 'post'
  })
}
